﻿@{
    Layout = null;
}


<div id="gridSearch" toolbar="#gridSearchTools">
</div>

<div id="gridSearchTools" style="padding-top: 3px;">  
    @if (Session["AuthID"].ToString() == "2" || Session["AuthID"].ToString() == "4")
    {
     <span>部室</span><input id="TheOffice" name="TheOffice" class="easyui-combobox" data-options="    
				valueField: 'ID',    
				textField: 'Name',
				url: '@Url.Content("~/Main/GetOffice")', 
				onLoadSuccess: function(rec){
					if(rec.length>0){
						$('#TheOffice').combobox('setValue',rec[0].ID);
					}
				}" />
    }
    开票单位:<input id="BillDepartment" name="BillDepartment" class="easyui-combobox" data-options="    
				valueField: 'ID',    
				textField: 'Name',
				url: '@Url.Content("~/Main/GetBillUnit")', 
				onLoadSuccess: function(rec){
					if(rec.length>0){
						$('#TheDepartment').combobox('setValue',rec[0].ID);
					}
				},
                loadFilter:function(data){  
                    var obj={};  
                    obj.ID='0';  
                    obj.Name='未开票'  
                    data.push(obj)//在数组0位置插入obj,不删除原来的元素  
                    return data;  
                }  " />
    业务类型:<input id="ParentType" class="easyui-combobox" data-options="    
        valueField: 'ID',    
        textField: 'TypeName',
        url: '@Url.Content("~/Main/GetParentType")', 
        onLoadSuccess: function(rec){
            if(rec){
                $('#ParentType').combobox('setValue',rec[0].ID);
            }
        },
        onSelect: function(rec){
            var url = '@Url.Content("~/Main/GetChildTypeAddAll?id=")'+rec.ID;
            $('#ChildrenType').combobox('clear');
            $('#ChildrenType').combobox('reload', url);
        }" />
    <input id="ChildrenType" class="easyui-combobox" data-options="
        valueField:'ID',
        textField:'TypeName',
        onLoadSuccess: function(rec){
            if(rec.length>0){
                $('#ChildrenType').combobox('setValue',rec[0].ID);
            }
        }" />
    客户名称&nbsp;<input id="searchName" class="easyui-textbox" data-options="iconCls:'icon-search'">
    起止日期:<input id="Date1" name="Date1" type="text" class="easyui-datebox"></input>-
    <input id="Date2" name="Date2" type="text" class="easyui-datebox"></input>
    超期<input type="checkbox" name="isOverTime" id="isOverTime" />
    欠款<input type="checkbox" name="isOwingMoney" id="isOwingMoney" />
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="BusinessSearch.DataGridSearch();">查询</a>
    @if (Session["AuthID"].ToString() == "2" || Session["AuthID"].ToString() == "4" || Session["AuthID"].ToString() == "3")
    {
      <a id="BusinessSearchExportToExcel" href="#" class="easyui-linkbutton" iconCls="icon-tip" plain="true" onclick="BusinessSearch.DataGridToExcel();">导出Excel</a>
    }
</div>  

<div id="dlgSearch" style="width: 900px; height: 480px;"></div>
<div id="dlgSearchEdit" style="width: 900px; height: 480px;"></div>
<script type="text/javascript" src="@Url.Content("~/Scripts/searchlist.js")"></script>
